package disruptor;

import com.lmax.disruptor.EventHandler;

import java.util.UUID;

/**
 * @author: 李德才
 * @description:
 * @create: 2020-12-20 19:49
 **/
public class DisruptorEventHandler implements EventHandler<DisruptorEvent> {

    Integer num = 0;

    public DisruptorEventHandler(Integer num) {
        this.num = num;
    }

    @Override
    public void onEvent(DisruptorEvent disruptorEvent, long l, boolean b) throws Exception {
        System.err.println("消费者：" + num + " | " + disruptorEvent.toString());
    }
}
